<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .active {
            color: red;
        }
    </style>
</head>

<body>
    <div id="app">
        <ul>
            <li @click='clickBtn(index)' v-for="(item,index) in musices" :class="{active:currentIndex==index}">
                {{index+1}}--{{item}}</li>
        </ul>
    </div>
    <script src='../js/vue.js'></script>
    <script>
        const app = new Vue({
            el: '#app',
            data: {
                currentIndex: 0,
                musices: ['陈奕迅', '张学友', '刘德华', '易烊千玺', '张杰', '周杰伦', '蒋振东', '何苏州']
            },
            methods: {
                clickBtn(index) {
                    this.currentIndex = index;
                }
            }
        })
    </script>
</body>

</html>